export class  TestContext implements INodeContext<IRoomPosition>
{
    db:Record<number,IRoomPosition>={

    };
    constructor(db:Record<number,IRoomPosition>)
    {
        this.db = db;
    }
    public getObject(key:number):IRoomPosition
    {
        return this.db[key];
    }
    
    public doAction(actions:INodeActionMove<IRoomPosition>[])
    {
        for(const a of actions)
        {
            const key = a.From.x+a.From.y*50;
            const key2 = a.To.x+a.To.y*50;
            delete this.db[key]
            this.db[key2]= a.To;
        }
    }
}
